Imports System.Collections
Imports SchemaCodeGen

Partial Public Class pages_templates_usercontrols_UCTemplate : Inherits UserControl

#Region "Interface"
    Public Sub Display(ByVal [template] As CTemplate, sortedList as CTemplateList)
        If Parent.Controls.Count Mod 2 = 0 Then row.Attributes.Add("class", "alt_row")

        With [template]
			litNumber.Text = CStr(sortedList.IndexOf(template) + 1)
			lnkTemplateName.Text = CStr(IIF(.TemplateName.Length = 0, "...", .TemplateName))
			lnkTemplateName.NavigateUrl = CSitemap.Template(.TemplateId)

			lnkVersions.Text = CUtilities.CountSummary(.Contents, "pattern", "none")
			lnkVersions.ToolTip = CUtilities.ListToString(.TemplateSets.Names, vbCrLf)
		End With
    End Sub
#End Region

End Class

